<template>
  <div>姓名:
    <slot :info="{fname:firstName,lname:lastName}">:{{ firstName + " " + lastName }}</slot>
    <hr>
    <div>
      <ul>
        <li v-for="item in data" :key="item.id">
          <slot :data="item">{{ item.name }}</slot>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MyTreeTest',
  props: {
    firstName: {
      type: String,
      default: ''
    },
    lastName: {
      type: String,
      default: ''
    },
    data: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style>
</style>
